package cn.xuewenbao.edu.mapper;

import cn.xuewenbao.edu.entity.Favorite;
import cn.xuewenbao.edu.entity.vo.MyLikeOrFavoriteContentVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * 收藏表 Mapper 接口
 * </p>
 *
 * @author mafayu
 * @since 2021-04-21
 */
@Mapper
public interface FavoriteMapper extends BaseMapper<Favorite> {

    @Select("SELECT title, cover, view_count " +
            "FROM ${tableName} " +
            "WHERE id = #{contentId} ")
    MyLikeOrFavoriteContentVo selectMyList(String contentId, String tableName);
}
